#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

//int treeleafnode(BTnode* root)
//{
//	if (root == NULL)
//	{
//		return 0;
//	}
//	if (root->left == NULL && root->right == NULL)
//	{
//		return 1;
//	}
//
//	return treeleafnode(root->left) + treeleafnode(root->right);
//}


int TreeHeight(BTNode* root)
{
	if (root == NULL)
	{
		return 0;
	}
	int left = TreeHeight(root->left);
	int right = TreeHeight(root->right);
	return 1 + left > right ? left : right;
}